package com.stone.framework.message.user;

import javax.validation.constraints.NotNull;

import com.stone.framework.message.SortableBody;

import io.swagger.annotations.ApiModelProperty;

public class RoleUserPageReqBody extends SortableBody {

    @ApiModelProperty(value = "角色ID", required = true)
    @NotNull(message = "[roleId] {title.notNull}")
    private Long roleId;

    @ApiModelProperty(value = "用户工号")
    private String username;

    @Override
    @ApiModelProperty(value = "排序，任意值", required = true)
    @NotNull(message = "[orderBy] {title.notNull}")
    public String getOrderBy() {
        return super.getOrderBy();
    }

    /**
     * 默认按user id排序
     */
    @Override
    public void setOrderBy(String orderBy) {
        super.setOrderBy("su.id");
    }

    public Long getRoleId() {
        return roleId;
    }

    public void setRoleId(Long roleId) {
        this.roleId = roleId;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

}
